package com.greedy.constants;

/**
 * @Author: Yanxy
 * @Date: Created in:2022-12-24
 * Description: 常量
 */
public class CommentConstants {

    /**
     * 短信验证码长度
     */
    public static final int CODE_LENGTH = 6;
    /**
     * 用户登录验证码Redis前缀
     */
    public static final String LOGIN_CODE_KEY = "login:code:";
    /**
     * 用户登录验证码Redis缓存时间
     */
    public static final Long LOGIN_CODE_TTL = 2L;
    /**
     * 新建用户时，用户的昵称前缀
     */
    public static final String USER_NICK_NAME_PREFIX = "user_";
    /**
     * 保存用户信息到Redis的前缀
     */
    public static final String LOGIN_USER_KEY = "login:token:";
    /**
     * 保存用户信息到Redis的过期时间
     */
    public static final Long LOGIN_USER_TTL = 21600L;
    /**
     * 分页最大页码大小
     */
    public static final int MAX_PAGE_SIZE = 10;
    /**
     * 分页默认页码大小
     */
    public static final int DEFAULT_PAGE_SIZE = 5;
    /**
     * 缓存穿透-缓存空值时间
     */
    public static final Long CACHE_NULL_TTL = 2L;
    /**
     * 店铺缓存Key
     */
    public static final String CACHE_SHOP_KEY = "cache:shop:";
    /**
     * 店铺缓存过期时间
     */
    public static final Long CACHE_SHOP_TTL = 30L;
    /**
     * 保存秒杀优惠券key
     */
    public static final String SECKILL_STOCK_KEY = "seckill:stock:";
    /**
     * 优惠券下单锁key
     */
    public static final String SECKILL_ORDER_STOCK_KEY = "lock:order:";

    public static final String BLOG_LIKED_KEY = "blog:liked:";
    public static final String FEED_KEY = "feed:";
    public static final String SHOP_GEO_KEY = "shop:geo:";
    public static final String USER_SIGN_KEY = "sign:";
}
